1. Field of the Invention
The present invention relates to a method of generating and searching for a ternary content addressable memory (TCAM) entry, and more particularly, to a method of generating a single TCAM entry for range search and exact match search and a method and apparatus for searching for a TCAM entry.
2. Description of the Related Art
In general, a ternary content addressable memory (TCAM) is used for simultaneously comparing TCAM entries with each other based on an input key value and finding a matched entry in a predicted time.
A method of searching a TCAM entry includes an exact-match searching method of finding an entry which is exactly matched to a key value and a range searching method for finding an entry having a prefix range corresponding to a key value using a don't care bit x.
Since a range which is not represented in a prefix form using the don't care bit cannot be represented by one TCAM entry, a conversion technology of dividing a range into several TCAM entries and representing the several TCAM entries is used in an application for searching a range except the prefix.
However, since the TCAM is more expensive and has high power consumption than a general memory device, the existing technology of converting the range has low efficiency in a storage space of the TCAM and thus cost unnecessarily increases.